package com.rxkj.authen;

/**
 * 角色枚举
 * by alex
 * 2022-4-6
 */
public enum Roles {

    ADMIN("超级管理员", 1),

    USER("用户组", 2),

    GUEST("游客", 3);

    private String name;

    private int level;

    private Roles() {
    }

    private Roles(String name, int level){
        this.name = name;
        this.level = level;
    }

    // 普通方法
    public static int getLevel(Roles role) {
        return role.level;
    }

    public String getName() {
        return name;
    }

    public int getLevel() {
        return level;
    }

}
